<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>讨论板</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Loading Bootstrap1 -->
        <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../page/front/disc/css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="../page/front/disc/css/icons.css" />
		<link rel="stylesheet" type="text/css" href="../page/front/disc/css/style1.css" />
    	<link rel="stylesheet" type="text/css" href="../page/front/disc/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="../page/front/disc/css/style2.css" />
		
		<!-- Loading Bootstrap1 -->
		<link rel="stylesheet" type="text/css" href="../page/front/disc/bianji/style.css">
        <link rel="stylesheet" type="text/css" href="../page/front/disc/bianji/src/js/jquery.notebook.css">
        <link rel="stylesheet" type="text/css" href="../page/front/disc/bianji/css/default.css" />
        <link rel="stylesheet" type="text/css" href="../page/front/disc/bianji/css/component.css" />
        <script src="../page/front/disc/bianji/js/modernizr.custom.js"></script>
		
		
		<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="../page/front/disc/js/html5shiv.js"></script>
	      <script src="../page/front/disc/js/respond.min.js"></script>
	    <![endif]-->
		 <style type="text/css">
            .top{
                height:300px;
                width: 60%;
                margin:0 auto ;
                
            }
            .top-touxiang{
                height:200px;
                width: 200px;
                background: url(../page/front/disc/bianji/touxiang.jpg) no-repeat;
                margin:20px auto;
                -webkit-border-radius:200px;
                -moz-border-radius:200px;
                border-radius:200px;
               
            }
            .top-formation{
                height:20%;
                width: 30%;
                margin :0 auto;
                text-align: center;
                font-size: 16px;
                color: #333; 
            }
            #submit{
            	width:60%;
            	margin:0 auto;
            	height:50px;
            }
            #select{
            	margin-top:10px;
            	float:right;
            }
            #nina{
            	width:250px; 
            	height:200px;
            	margin-top:20px;
            	margin-left:75px;
            }
            #neirong{
            	width:250px; 
            	height:220px;
            	margin:0 auto;
            	text-align:center;
            }
            #neirong span{
            	width:100px;
            	height:30px;
            	line-height:30px;
            	text-center:center;
            }
            #timu{
            	margin:0 auto;
            }
        </style>
	</head>
<body> 
		 <div class="top">
	        <div class="top-touxiang">
	
	        </div>
	        <div class="top-formation">
	            Mr.zhang~~<br>
	            1995.02.13
	        </div>
	    </div>
	    <div class="editor" id="edit">
	           
	    </div>
	    
	    <div id="niantie">
			<div id="back" style="display:none; position:absolute; left:0; top:0; width:100%; height:100%; filter:alpha(opacity=10)"></div>
			<div id="win" style="display:none; position:absolute; z-index:99; left:60%; top:50%; width:400px; height:300px; margin-left:-300px; margin-top:-200px; border:1px solid #888; background-color:#edf; text-align:center">
				<span id="timu">线下交流模板</span>
				<div id="nina">
					<div contenteditable="true" id="neirong">
						<span><b>标题</b></span>:<span>您的标题</span><br/>
						<span><b>时间</b></span>:<span>活动时间</span><br/>
						<span><b>详细内容</b></span>:<span>活动内容</span><br/>
						<span><b>地点</b></span>:<span>活动地点（可多个）</span><br/>
						<span><b>费用</b></span>:<span>活动费用</span><br/>
						<span><b>负责人</b></span>:<span>负责人</span><br/>
						<span><b>联系方式</b></span>:<span>负责人联系方式</span>
					</div>
				</div>
				<br/><a href="javascript:closeLogin();">关闭</a>
			</div>
	
			<script type="text/javascript">
				function openLogin(){
				   document.getElementById("win").style.display="";
				   document.getElementById("back").style.display="";
				};
				function closeLogin(){
				   document.getElementById("win").style.display="none";
				   document.getElementById("back").style.display="none";
				};
			</script>
	    </div>
	    <div id="submit">
	    	<div id="select">
	    		<select class="selectpicker" id="type">
					<option value="1"> 讨论 </option>
					<option value="2"> 定时讨论 </option>
					<option value="3"> 线下交流   </option>
				</select>&nbsp;&nbsp;&nbsp;<a href="javascript:openLogin();">模板</a>
				<button class="btn btn-primary" id="add">发表</button><br/>
	    	</div>
	    </div>
		<nav id="bt-menu" class="bt-menu">
			<a href="#" class="bt-menu-trigger">Menu</a>
			<ul>
				<li><a href="../fdis/taol.html" >收索</a></li>
				<li><a href="../fdis/fbed.html" >我发布的</a></li>
				<li><a href="../fdis/canyu.html" >我参与的</a></li>
				<li><a href="../fdis/fabu.html" >我要发布</a></li>
				<li><a href="../index/index.html" >返回首页</a></li>
			</ul>
		</nav>
		
	
	<script src="../page/front/disc/js/classie.js"></script>
	<script src="../page/front/disc/js/borderMenu.js"></script>
	<script src="../page/front/disc/js/jquery-1.8.3.min.js"></script>
   	<script src="../page/front/disc/js/bootstrap.min.js"></script>
   	<script>
		var _gaq = _gaq || []; 	_gaq.push(['_setAccount', 'UA-7489188-1']); _gaq.push(['_trackPageview']);
		(function() {
			var ga = document.createElement('script'); ga.async = true; ga.src = '../page/front/disc/js/ga.js';
			var s = document.getElementsByTagName('script')[0];
			s.parentNode.insertBefore(ga, s);
		})();
	</script>
	
	<!-- 编辑器 -->
	 <script type="text/javascript" src="../page/front/disc/bianji/src/js/libs/jquery-1.10.2.min.js"></script>
      <script type="text/javascript" src="../page/front/disc/bianji/src/js/jquery.notebook.js"></script>
      <script type="text/javascript">
          $(document).ready(function() {
              $('.editor').notebook({
                  autoFocus: true,
                  placeholder: 'Write down what you want'
              });
//           	  var d=document.getElementsByTagName('bold');
//           	  d.style.margin="0";
				
          });
          
      </script>
      <script src="../page/front/disc/bianji/js/ytmenu.js"></script>
      <script type="text/javascript">
			//表单提交采用json提交
			$("button#add").click(function(){
		          var obj={
						"drContent":$("#edit").html(),
						"drType":$("#type").val()
					};
					if($("#type").val()==3){
						alert("线下交流需要管理员的审批，通过时才会得到发布！");
					}
					$.post("../fdis/add.json",obj,function(json){
						if($("#type").val()==3){
							if(json == 1){
						        alert("已发送给管理员！");
						        location.href='fabu.html';
							}else{
						        alert("发送失败！");
							}
						}else{
							if(json == 1){
						        alert("发表成功！");
						        location.href='fabu.html';
							}else{
						        alert("发表失败！");
							}
						}
					});
			});
			//表单提交结束
			
		</script>
	</body>
</html>  